package com.yuanfeng.job.service.impl;

import com.yuanfeng.job.mapper.UpdateSalesPromStateMapper;
import com.yuanfeng.job.service.UpdateSalesPromStateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Stranger
 * @date 2023/5/17 11:31
 */
@Service
public class UpdateSalesPromStateServiceImpl implements UpdateSalesPromStateService {

    @Autowired
    private UpdateSalesPromStateMapper updateSalesPromStateMapper;

    @Override
    public String updateState() {
        Integer redPacTempInteger = updateSalesPromStateMapper.updateRedpkTempState();
        Integer redPacBaseInteger = updateSalesPromStateMapper.updateRedpkBaseState();
        Integer voucherTempInteger = updateSalesPromStateMapper.updateVouchrTempState();
        Integer voucherBaseInteger = updateSalesPromStateMapper.updateVouchrBaseState();

        return "本次更新代金券模板  "+redPacTempInteger+" 张，" +"用户已领的代金券  "+redPacBaseInteger+ " 张。"+
                "更新红包模板  "+voucherTempInteger+" 张，" +"用户已领的红包  "+voucherBaseInteger+ " 张";
    }
}
